:root {
  --ladle-bg-color-primary: #fff;
  --ladle-bg-color-secondary: #f4f4f4;
  --ladle-color-primary: #000;
  --ladle-color-secondary: #bbb;
  --ladle-color-hover: #545454;
  --ladle-color-accent: #276ef1;
  --ladle-ring-size: 64px;
  --ladle-ring-thickness: 6px;
  --ladle-mode-overflow: hidden;
  --ladle-mode-height: 100vh;
  --ladle-main-padding: 3em;
  --ladle-main-padding-mobile: 1em;
  --reach-dialog: 1;
  --ladle-blueprint: #aaa;
}
[data-theme="dark"] {
  --ladle-bg-color-primary: #141414;
  --ladle-bg-color-secondary: #1f1f1f;
  --ladle-color-primary: #f6f6f6;
  --ladle-color-secondary: #bbb;
  --ladle-color-hover: #e2e2e2;
  --ladle-color-accent: #276ef1;
  --ladle-blueprint: #1f1f1f;
}
[data-mode="single-scroll"],
[data-mode="preview"] {
  --ladle-mode-overflow: visible;
  --ladle-mode-height: 100%;
}
[data-iframed] {
  --ladle-main-padding: 0;
  --ladle-main-padding-mobile: 0;
  --ladle-main-padding: 0;
}

.ladle-wrapper,
html,
body {
  margin: 0;
}

[data-iframed]:not([data-iframed="0"]) .ladle-main {
  display: grid;
  grid-template-columns: minmax(64px, 1fr) auto minmax(64px, 1fr);
  overflow: auto;
  background-color: var(--ladle-blueprint);
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.1) 2px,
      transparent 2px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 2px, transparent 2px),
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size:
    100px 100px,
    100px 100px,
    20px 20px,
    20px 20px;
  background-position:
    -2px -2px,
    -2px -2px,
    -1px -1px,
    -1px -1px;
}

.ladle-iframe {
  height: 100%;
  border: 0;
  background-color: var(--ladle-bg-color-primary);
}

[data-iframed]:not([data-iframed="0"]) .ladle-iframe {
  grid-column: 2;
  height: calc(100% - 128px);
  min-height: 500px;
  margin-top: 64px;
  margin-bottom: 64px;
  box-shadow:
    rgba(0, 0, 0, 0.25) 0px 54px 55px,
    rgba(0, 0, 0, 0.12) 0px -12px 30px,
    rgba(0, 0, 0, 0.12) 0px 4px 6px,
    rgba(0, 0, 0, 0.17) 0px 12px 13px,
    rgba(0, 0, 0, 0.09) 0px -3px 5px;
}

.ladle-background {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1000;
  width: 100%;
  height: 100%;
  background-color: var(--ladle-bg-color-primary);
}

.ladle-wrapper {
  display: flex;
  flex-direction: column;
}

.ladle-aside img,
.ladle-aside svg {
  display: inline;
  vertical-align: baseline;
}

.ladle-main {
  flex: 1 1 auto;
  padding: var(--ladle-main-padding-mobile);
}

.ladle-error-content {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  color: var(--ladle-color-primary);
}

.ladle-link {
  color: var(--ladle-color-accent);
}

.ladle-aside {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  background-color: var(--ladle-bg-color-primary);
  color: var(--ladle-color-primary);
  padding: 1.5em;
}

.ladle-aside input {
  padding: 0.5em 0em;
  width: 100%;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-color: var(--ladle-color-hover);
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-radius: 0;
  background-color: var(--ladle-bg-color-primary);
  font-size: 1em;
  color: var(--ladle-color-primary);
  margin-bottom: 0.5em;
}

.ladle-aside input:focus {
  outline: none;
  color: var(--ladle-color-accent);
  border-color: var(--ladle-color-accent);
}

.ladle-aside ul {
  padding: 0;
  margin: 0.8em 0.75em 0 0.75em;
}

.ladle-aside li {
  list-style-type: none;
  margin: 0.8em 0.35em;
}

.ladle-aside li {
  list-style-type: none;
  margin: 0.8em 0.35em;
}

.ladle-aside li:focus {
  outline: none;
}

.ladle-aside li:focus-visible > div {
  outline: 2px solid var(--ladle-color-accent);
  outline-offset: 2px;
}

.ladle-aside a {
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ladle-color-primary);
}

.ladle-aside a:hover {
  color: var(--ladle-color-hover);
}

.ladle-aside a:focus {
  outline: none;
}

.ladle-aside a:focus-visible {
  outline: 2px solid var(--ladle-color-accent);
  outline-offset: 2px;
}

.ladle-aside .ladle-active a {
  font-weight: 700;
}

.ladle-addons {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ladle-color-primary);
  padding: 0;
  margin: 0;
  position: relative;
  bottom: 0;
  margin-inline-start: 1em;
  margin-inline-end: 1em;
  margin-bottom: 2em;
}

.ladle-addons ul {
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
}

.ladle-addons li {
  background-color: var(--ladle-bg-color-secondary);
  box-shadow: 0 1px 2px hsla(0, 0%, 0%, 0.16);
  border-bottom: none;
  border-top-left-radius: 0.25em;
  border-top-right-radius: 0.25em;
  border-bottom-left-radius: 0.25em;
  border-bottom-right-radius: 0.25em;
  list-style-type: none;
  margin: 0.35em;
  width: auto;
  height: 2.5em;
}

.ladle-addons > ul > li > button {
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  margin: 0;
  padding: 0.3em;
  width: 100%;
  height: 100%;
  overflow: visible;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: normal;
  cursor: pointer;
  border-radius: 4px;
  outline: none;
}

.ladle-addons > ul > li > button > label {
  display: block;
  cursor: pointer;
  line-height: 24px;
  font-size: 18px;
  margin-inline-start: 0.5em;
  padding-top: 0.1em;
}

.ladle-addon-modal-body > button {
  border: 0;
  font-size: 14px;
  border-radius: 4px;
  padding: 0.25em 0.5em;
  margin: 1em 0em;
  background: var(--ladle-color-accent);
  color: #fff;
  font: inherit;
  letter-spacing: inherit;
}

.ladle-addons > ul > li > button > .ladle-badge {
  font-style: normal;
  min-width: 1.6em;
  margin-left: 1em;
  height: 1.6em;
  border-radius: 0.8em;
  background-color: #fa3e3e;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8em;
  color: white;
}

.ladle-addon-modal-body select,
.ladle-addon-modal-body input,
.ladle-addon-modal-body textarea {
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid var(--ladle-color-primary);
  padding: 0.5em 0.75em;
  margin: 0;
  background: var(--ladle-bg-color-primary);
  color: var(--ladle-color-primary);
}

.ladle-addon-modal-body input[type="range"] {
  padding: 0;
  margin: 0 0.5em;
  vertical-align: middle;
}

.ladle-addon-modal-body > button:hover {
  color: #ccc;
}

.ladle-addon-tooltip {
  box-shadow: 0 1px 2px hsla(0, 0%, 0%, 0.16);
  display: none;
  white-space: nowrap;
  background: var(--ladle-bg-color-secondary);
  color: var(--ladle-color-primary);
  border-radius: 4px;
  margin-top: -96px;
  inset-inline-start: 5px;
  padding: 10px;
  position: absolute;
  z-index: 1000;
}

.ladle-addon-source-lineno {
  display: table-cell;
  text-align: right;
  padding-right: 0.25em;
  padding-left: 0.25em;
  user-select: none;
  opacity: 0.5;
}

.ladle-addons > ul > li > .ladle-active {
  color: var(--ladle-color-accent);
}

.ladle-addons > ul > li > .source-active,
.ladle-addons > ul > li > .width-active {
  color: var(--ladle-color-accent);
}

.ladle-addons > ul > li > .a11y-active {
  color: var(--ladle-color-accent);
}

.ladle-addons > ul > li > button:focus-visible {
  border: 2px solid var(--ladle-color-accent);
}

.ladle-addons > ul > li > button:hover {
  box-shadow: none;
  color: var(--ladle-color-accent);
}

.ladle-controls-table td {
  padding: 0.25em 1em 0.25em 0em;
}

.ladle-controls-table input {
  margin: 0;
}

.ladle-controls-table input[type="radio"] {
  margin-right: 0.3em;
}

.ladle-controls-table span {
  margin-right: 1em;
}

.ladle-controls-table select {
  min-width: 177px;
}

.ladle-controls-table textarea {
  min-width: 172px;
  min-height: 3em;
}

.ladle-controls-table {
  margin-bottom: 1em;
}

.ladle-ring-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  visibility: hidden;
  animation: ladle-ring-fadein 1.5s;
  animation-fill-mode: forwards;
  animation-delay: 0.5s; /* no spinner flickering for fast load times */
}

@keyframes ladle-ring-fadein {
  from {
    visibility: visible;
    opacity: 0;
  }
  to {
    visibility: visible;
    opacity: 1;
  }
}

.ladle-ring {
  display: inline-block;
  position: relative;
  width: var(--ladle-ring-size);
  height: var(--ladle-ring-size);
}

.ladle-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  border: var(--ladle-ring-thickness) solid var(--ladle-color-secondary);
  border-radius: 50%;
  animation: ladle-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: var(--ladle-color-secondary) transparent transparent transparent;
}

.ladle-ring div:nth-child(1) {
  animation-delay: -0.45s;
}

.ladle-ring div:nth-child(2) {
  animation-delay: -0.3s;
}

.ladle-ring div:nth-child(3) {
  animation-delay: -0.15s;
}

@keyframes ladle-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

div[data-reach-dialog-content][data-testid="ladle-dialog"] {
  box-shadow: 0 1px 2px hsla(0, 0%, 0%, 0.16);
  outline: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  background-color: var(--ladle-bg-color-secondary);
  color: var(--ladle-color-primary);
  border-radius: 4px;
  padding: 1.2em 2em 0.8em 2em;
  margin: 21px;
  position: absolute;
  bottom: 0px;
  overflow: none;
}

div[data-reach-dialog-content][data-testid="ladle-dialog"] a {
  color: var(--ladle-color-accent);
}

div[data-reach-dialog-overlay][data-testid="ladle-dialog-overlay"] {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: auto;
  z-index: 2147483647;
}

.ladle-button {
  box-sizing: border-box;
  box-shadow: 0 1px 2px hsla(0, 0%, 0%, 0.16);
  border: 1px solid var(--ladle-color-secondary);
  margin: 1px 8px;
  padding: 0.5em;
  width: auto;
  cursor: pointer;
  overflow: visible;
  background: inherit;
  color: inherit;
  border-radius: 4px;
  font: inherit;
  line-height: normal;
  -webkit-font-smoothing: inherit;
  -moz-osx-font-smoothing: inherit;
  -webkit-appearance: none;
}

.ladle-button:hover {
  background: var(--ladle-bg-color-secondary);
  color: var(--ladle-color-accent);
}

.ladle-button:focus {
  outline: none;
}

.ladle-button:focus-visible {
  border: 2px solid var(--ladle-color-accent) !important;
  margin: 0px 7px;
}

q.ladle-code,
code.ladle-markdown {
  tab-size: 2;
  padding: 0.2em 0.4em;
  margin: 0;
  line-height: 2;
  font-size: 85%;
  background-color: var(--ladle-bg-color-secondary);
  border: 1px solid var(--ladle-color-hover);
  color: var(--ladle-color-primary);
  border-radius: 6px;
  font-family:
    SFMono-Regular,
    Consolas,
    Liberation Mono,
    Menlo,
    monospace;
}

h1.ladle-markdown,
h2.ladle-markdown,
h3.ladle-markdown,
h4.ladle-markdown,
h5.ladle-markdown,
h6.ladle-markdown {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ladle-color-primary);
}

p.ladle-markdown,
ul.ladle-markdown,
ol.ladle-markdown {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: var(--ladle-color-primary);
}

a.ladle-markdown {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: var(--ladle-color-accent);
}

blockquote.ladle-markdown {
  border-left: 6px solid var(--ladle-color-secondary);
  padding-left: 24px;
  margin-left: 0;
}

.ladle-addon-modal-body {
  max-height: 80vh;
  overflow: auto;
  tab-size: 2;
}

.ladle-addon-modal-body ul {
  list-style: square;
  overflow: auto;
  margin: 8px;
  padding-left: 40px;
}

.ladle-resize-handle {
  display: none;
}

@media (min-width: 768px) {
  html,
  body {
    height: 100%;
  }

  .ladle-wrapper {
    min-height: 100%;
    margin: 0;
    flex-direction: row;
    align-items: flex-start;
  }

  [data-mode="full"] html,
  [data-mode="full"] body,
  [data-mode="full"] .ladle-wrapper {
    height: 100vh;
    overflow: hidden;
  }

  .ladle-resize-handle {
    transition: box-shadow 0.15s ease-in;
    display: block;
    width: 16px;
    height: 100%;
    cursor: col-resize;
    background-color: var(--ladle-bg-color-secondary);
  }

  .ladle-resize-handle:hover {
    box-shadow: inset 3px 0 0 0 var(--ladle-color-accent);
  }

  [data-reversed] .ladle-resize-handle:hover {
    box-shadow: inset -3px 0 0 0 var(--ladle-color-accent);
  }

  .ladle-resize-active {
    box-shadow: inset 3px 0 0 0 var(--ladle-color-accent);
  }

  [data-reversed] .ladle-resize-active {
    box-shadow: inset -3px 0 0 0 var(--ladle-color-accent);
  }

  .ladle-aside {
    box-sizing: content-box;
  }

  .ladle-main {
    padding: var(--ladle-main-padding);
    align-self: stretch;
  }

  .ladle-aside {
    font-size: 16px;
    flex: 0 0 12em;
    padding: 3em 2em;
    padding-left: calc(2em - 16px);
    min-width: 15em;
    background-color: var(--ladle-bg-color-secondary);
    align-self: stretch;
  }

  [data-reversed] .ladle-aside {
    padding-left: 2em;
    padding-right: calc(2em - 16px);
  }

  [data-mode="full"] .ladle-main,
  [data-mode="full"] .ladle-aside {
    overflow: auto;
  }

  .ladle-aside ul {
    margin: 0;
    user-select: none;
    margin-inline-start: 0.75em;
  }

  .ladle-aside li {
    margin: 0.35em 0.35em;
    line-height: 18px;
  }

  .ladle-aside input {
    line-height: 1;
    background-color: var(--ladle-bg-color-secondary);
  }

  .ladle-aside input::placeholder {
    user-select: none;
  }

  .ladle-addons {
    position: fixed;
    margin-bottom: 0;
    z-index: 2147483647;
  }

  .ladle-addons ul {
    flex-direction: row;
  }

  .ladle-addons li {
    margin: 0 0.35em 0 0.35em;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    width: 2.5em;
  }

  .ladle-addons > ul > li > button > label {
    display: none;
  }

  div[data-reach-dialog-content][data-testid="ladle-dialog"] {
    position: fixed;
    bottom: 49px;
    inset-inline-start: 21px;
    margin-inline-end: 21px;
    max-width: 40em;
    margin: 0;
  }

  .ladle-addons > ul > li > button:hover .ladle-addon-tooltip {
    display: block;
  }

  .ladle-addons > ul > li > button > .ladle-badge {
    position: absolute;
    margin-left: 3.1em;
    top: -0.7em;
    font-size: 0.7em;
  }
}
